<?php 
include 'config.php';
if (!defined('BASEPATH')) exit('No direct script access allowed');
include 'lib/fun.php';
$url = (array_key_exists('u',$_GET)) ? trim($_GET['u']) : '' ;
$url = rstrtrim($url,'/index.php');
$list = get_filename(MDPATH.$url,true);
header('Content-Type: application/json');
echo json_encode($list);
?>

